package com.luke.cloud.payment.controller;

import com.luke.cloud.order.service.RemoteOrderService;
import com.luke.cloud.user.service.RemoteUserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Descrtption PaymentController
 * @Author luke
 * @Date 2020/4/2
 **/
@RestController
@RequestMapping("/payment")
public class PaymentController {

    @Reference
    RemoteOrderService remoteOrderService;

    @Reference
    RemoteUserService remoteUserService;

    @GetMapping("/pay")
    public String pay(@RequestParam("message") String message){
        return remoteOrderService.echo(message) + remoteUserService.echo(message);
    }

}
